import request from '@/utils/request'

// 查询服务单列表
export function listUnit(query) {
  return request({
    url: '/business/service/order/list',
    method: 'get',
    params: query
  })
}
// 查询服务单列表
export function listUnitemployerUnitList(query) {
  return request({
    url: '/system/unit/employerUnitList',
    method: 'get',
    params: query
  })
}

// 查询服务单详细
export function getUnit(id) {
  return request({
    url: '/business/service/order/' + id,
    method: 'get'
  })
}

// 新增服务单
export function addUnit(data) {
  return request({
    url: '/business/service/order',
    method: 'post',
    data: data
  })
}

// 修改服务单
export function updateUnit(data) {
  return request({
    url: '/business/service/order',
    method: 'put',
    data: data
  })
}

// 删除服务单
export function delUnit(id) {
  return request({
    url: '/business/service/order/' + id,
    method: 'delete'
  })
}

// 获取所有服务单
export function getAllServiceOrder(params) {
  return request({
    url: "/business/service/order/getAllServiceOrder",
    method: 'get',
    params
  })
}
